<!--
Computer Science Course 531 - Introduction to Software Engineering
Olive Insurance Client Management System (Client Database Access)
Version 1.0 (Base System)
Spring 2011

-- Source Code Details --
Page Tile: mainPage.php
Created By: David Gonzalez, Computer Science (Undergraduate)
Documented By: Darrius Serrant, Computer Science (Undergraduate)
Purpose: User interface that provides users access to all of this application's basic
         functionalities:
            (a) Adding, modifying, and removing agency groups to relational database.
            (b) Adding, modifying, and removing employees to the relational database.
            (c) Generating reports that reflect the database's contents.
          Users who are authorized system administrators have additional access to the
          following functionalities:
            (a) Adding, modifying, and removing user accounts
            (b) Adding, modifying, and removing carrier and coverage types

Status: In Evaluation: All security blocks, form validation, and database
         connectivity features have been omitted for the time being to illustrate
         the application's basic flow and functionality. All extended features illusrated
         in the specification (i.e. inline search by agency group, employee, agent, and coverage type)
         have been excluded for simplicity and will be implemented in the later phases.
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <h2>Choose Database:</h2>
    <body>
        <?php
        $User_Name = $_POST['User_Name'];
        $password = $_POST['password'];
        if( $User_Name == "Agent" && $password == "Agent"){
            ?>
        <form action="employeeDetails.php" method ="POST">
        <input type=hidden name=User_Name value=<?php echo $User_Name;?>>
        <input type=hidden name=password value=<?php echo $password;?>>
        <input type="submit" name="submit" value="Employee Database">
        </form>
        <form action="agencyGroupDetails.php" method ="POST">
        <input type=hidden name=User_Name value=<?php echo $User_Name;?>>
        <input type=hidden name=password value=<?php echo $password;?>>
        <input type="submit" name="submit" value="Group Database">
        </form>
        <form action="reportDetails.php" method ="POST">
        <input type=hidden name=User_Name value=<?php echo $User_Name;?>>
        <input type=hidden name=password value=<?php echo $password;?>>
        <input type="submit" name="submit" value="Generate Reports">
        </form>
        <form action="signIn.php" method ="POST">
        <input type="submit" name="submit" value="LogOut">
        </form>
        <?php
        }elseif($User_Name == "Admin" && $password == "Admin"){
            ?>
        <form action="employeeDetails.php" method ="POST">
        <input type=hidden name=User_Name value=<?php echo $User_Name;?>>
        <input type=hidden name=password value=<?php echo $password;?>>
        <input type="submit" name="submit" value="Employee Database">
        </form>
        <form action="agencyGroupDetails.php" method ="POST">
        <input type=hidden name=User_Name value=<?php echo $User_Name;?>>
        <input type=hidden name=password value=<?php echo $password;?>>
        <input type="submit" name="submit" value="Group Database">
        </form>
        <form action="reportDetails.php" method ="POST">
        <input type=hidden name=User_Name value=<?php echo $User_Name;?>>
        <input type=hidden name=password value=<?php echo $password;?>>
        <input type="submit" name="submit" value="Generate Reports">
        </form>
        <form action="agentAccountDetails.php" method ="POST">
        <input type=hidden name=User_Name value=<?php echo $User_Name;?>>
        <input type=hidden name=password value=<?php echo $password;?>>
        <input type="submit" name="submit" value="Agent Database">
        </form>
        <form action="carrierDetails.php" method ="POST">
        <input type=hidden name=User_Name value=<?php echo $User_Name;?>>
        <input type=hidden name=password value=<?php echo $password;?>>
        <input type="submit" name="submit" value="Carrier Database">
        </form>
        <form action="coverageTypeDetails.php" method ="POST">
        <input type=hidden name=User_Name value=<?php echo $User_Name;?>>
        <input type=hidden name=password value=<?php echo $password;?>>
        <input type="submit" name="submit" value="Coverage Database">
        </form>
        <form action="signIn.php" method ="POST">
        <input type=hidden name=User_Name value=<?php echo $User_Name;?>>
        <input type=hidden name=password value=<?php echo $password;?>>
        <input type="submit" name="submit" value="LogOut">
        </form>
        <?php
        }else{
            echo "Log In Failed!!!!!";
           ?>
            <form action="signIn.php" method ="POST">
        <input type="submit" name="submit" value="LogOut">
        </form>
            <?php
        }
        ?>
    </body>
</html>